"""
后台的压力太大任务栏会显示错误 修改注册表来重启任务栏就哈
"""
import os
from time import sleep

# v[8]=2为显示
os.system(r"""
powershell -command "&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=2;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer}"
""")
sleep(2)

# 3为隐藏
os.system(r"""
powershell -command "&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3';$v=(Get-ItemProperty -Path $p).Settings;$v[8]=3;&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer}"
""")

"死机了？"
choose = input("y重启任务栏")
if(choose == "y"):
    os.system("explorer.exe")



